﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Collections;
using System.Data;

namespace Hospital
{
    class BenhNhanDAO
    {
        public static ArrayList getAllBN_TT()
        {
            DataTable dt = new DataTable();
            OleDbConnection cn;
            // B1 & B2: Tao chuoi ket noi, mo ket noi bang doi tuong ket noi
            cn = DataProvider.ConnectionData();
            // B3: Tao chuoi strSQL thao tac CSDL
            string strSQL = "Select * From Account";
            OleDbDataAdapter da = new OleDbDataAdapter(strSQL, cn);
            da.Fill(dt);
            // B5: Dong ket noi CSDL
            cn.Close();

            ArrayList arrUser = new ArrayList();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                //UserDTO userDto = new UserDTO();
                object obj = dt.Rows[i];
                //userDto.IIdUser = int.Parse(((DataRow)obj)["id"].ToString());
                //userDto.StrName = ((DataRow)obj)["name"].ToString();
                //arrUser.Add(userDto);
            }

            return arrUser;
        }



    }
}
